package com.atguigu.sink;

import com.atguigu.func.ClickSource;
import com.atguigu.func.MySinkFunction;
import com.atguigu.pojo.Event;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Author Mr.Zheng
 * @Date 2023/6/15 13:27
 *
 *
 *
 */
public class Flnik06_UserDefineSink {
    public static void main(String[] args) throws Exception {

        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);

        DataStreamSource<Event> ds = env.addSource(new ClickSource());

        ds.addSink(new MySinkFunction());


        env.execute();

    }
}
